﻿<div id='alwayStalker_{$widget_info->seq}' style='position:absolute;'>
    <div>
        <div>
        <!--@if(count($widget_info->document_list))-->
                <!--@for($j=0;$j<$widget_info->rows_list_count;$j++)-->
                    {@ $oDocument = $widget_info->document_list[$j]}
                    <!--@if($oDocument->document_srl)-->
                        {$oDocument->getContent(false,false,false,false)}
                    <!--@end-->
                <!--@end-->
        <!--@end-->
        </div>
    </div>
</div>

<script type='text/javascript'>
<!--
		var holdPlay_{$widget_info->seq}=0;
		var topPosition_{$widget_info->seq}={$widget_info->addon_top};
		<!--@ if($widget_info->addon_position==1)-->
			//고정식
		var stalker_center1_{$widget_info->seq}=0;
		var stalker_stmWidth_{$widget_info->seq}=0;
		<!--@else-->
			//유동식
		var stalker_center1_{$widget_info->seq}=xClientWidth()/2;
		var stalker_stmWidth_{$widget_info->seq}={$widget_info->addon_width};
		<!--@end-->

		var stalker_bottomGap_{$widget_info->seq}={$widget_info->addon_bottom};

		var stalker_stmnLEFT_{$widget_info->seq} = {$widget_info->addon_left};    // 스크롤메뉴의 좌측 위치
		var stalker_stalker_stmnGAP1_{$widget_info->seq} = {$widget_info->addon_top};    // 페이지 헤더부분의 여백

		<!--@if($widget_info->addon_basic==1)-->
		var stalker_stmnBASE_{$widget_info->seq} = xClientHeight()-{$widget_info->addon_top};    // 스크롤메뉴 초기 시작위치 (아무렇게나 해도 상관은 없지만 stalker_stalker_stmnGAP1과 약간 차이를 주는게 보기 좋음)
		var stalker_stmnGAP2_{$widget_info->seq} = stalker_stmnBASE_{$widget_info->seq};    // 스크롤시 브라우저 상단과 약간 띄움. 필요없으면 0으로 세팅
		<!--@else-->
		var stalker_stmnBASE_{$widget_info->seq} = {$widget_info->addon_top};    // 스크롤메뉴 초기 시작위치 (아무렇게나 해도 상관은 없지만 stalker_stalker_stmnGAP1과 약간 차이를 주는게 보기 좋음)
		var stalker_stmnGAP2_{$widget_info->seq} = {$widget_info->addon_top_gap};    // 스크롤시 브라우저 상단과 약간 띄움. 필요없으면 0으로 세팅
		<!--@end-->

		var stalker_stmnActivateSpeed_{$widget_info->seq} = {$widget_info->addon_activate_speed}; // 움직임을 감지하는 속도 (숫자가 클수록 늦게 알아차림)
		var stalker_stmnScrollSpeed_{$widget_info->seq} = {$widget_info->addon_scroll_speed};  // 스크롤되는 속도 (클수록 늦게 움직임)
		var stalker_stmnScrollMove_{$widget_info->seq} = {$widget_info->addon_scroll_move};  // 스크롤되는 간격 (클수록 늦게 부드러움)

		var stalker_stmnTimer_{$widget_info->seq};

		var stalker_ee_{$widget_info->seq}=xGetElementById('alwayStalker_{$widget_info->seq}');
		var stalker_e1_{$widget_info->seq}='alwayStalker_{$widget_info->seq}';

		// 메뉴의 위치를 갱신한다.
		function stalkerRefreshStaticMenu_{$widget_info->seq}(){
			<!--@if($widget_info->addon_basic==1)-->
				stalker_stmnBASE_{$widget_info->seq} = xClientHeight()-{$widget_info->addon_top};
				stalker_stmnGAP2_{$widget_info->seq} = xClientHeight()-{$widget_info->addon_top_gap};
			<!--@end-->

			var stalker_stmnStartPoint_{$widget_info->seq}, stalker_stmnEndPoint_{$widget_info->seq}, stalker_stmnRefreshTimer_{$widget_info->seq};

			<!--@if ($widget_info->addon_position==2)-->  //유동적
				var stalker_center1_{$widget_info->seq}=xClientWidth()/2;
				var stalker_stmWidth_{$widget_info->seq}={$widget_info->addon_width};
				stalker_ee_{$widget_info->seq}.style.left = stalker_center1_{$widget_info->seq}+(stalker_stmWidth_{$widget_info->seq}/2)+(stalker_stmnLEFT_{$widget_info->seq}-stalker_stmWidth_{$widget_info->seq}) + 'px';
			<!--@else-->
				stalker_ee_{$widget_info->seq}.style.left = xLeft(stalker_e1_{$widget_info->seq},stalker_stmnLEFT_{$widget_info->seq});
			<!--@end-->

			if({$widget_info->addon_hold}!=1 || holdPlay_{$widget_info->seq}!=1){
                stalker_stmnStartPoint_{$widget_info->seq} = xTop(stalker_e1_{$widget_info->seq});
                topPosition_{$widget_info->seq} = xScrollTop() + stalker_stmnGAP2_{$widget_info->seq};
                <!--@if($widget_info->addon_hold!=1)-->
                if (topPosition_{$widget_info->seq} > xGetBodyHeight()-stalker_bottomGap_{$widget_info->seq})topPosition_{$widget_info->seq}=xGetBodyHeight()-stalker_bottomGap_{$widget_info->seq};
                <!--@end-->
                stalker_stmnEndPoint_{$widget_info->seq} = topPosition_{$widget_info->seq};
                <!--@if($widget_info->addon_hold==1)-->holdPlay_{$widget_info->seq}=1;<!--@end-->
			}

            if (stalker_stmnEndPoint_{$widget_info->seq} < stalker_stalker_stmnGAP1_{$widget_info->seq}) stalker_stmnEndPoint_{$widget_info->seq} = stalker_stalker_stmnGAP1_{$widget_info->seq};

            stalker_stmnRefreshTimer_{$widget_info->seq} = stalker_stmnActivateSpeed_{$widget_info->seq};

            if (stalker_stmnStartPoint_{$widget_info->seq} != stalker_stmnEndPoint_{$widget_info->seq} ) {
                stalker_stmnScrollAmount_{$widget_info->seq} = Math.ceil(Math.abs(stalker_stmnEndPoint_{$widget_info->seq} - stalker_stmnStartPoint_{$widget_info->seq}) / stalker_stmnScrollMove_{$widget_info->seq});
                xTop(stalker_e1_{$widget_info->seq},xTop(stalker_e1_{$widget_info->seq}) + ((stalker_stmnEndPoint_{$widget_info->seq} < stalker_stmnStartPoint_{$widget_info->seq}) ? -stalker_stmnScrollAmount_{$widget_info->seq} : stalker_stmnScrollAmount_{$widget_info->seq}));
                stalker_stmnRefreshTimer_{$widget_info->seq} = stalker_stmnScrollSpeed_{$widget_info->seq};
            }
			stalker_stmnTimer_{$widget_info->seq} = setTimeout ('stalkerRefreshStaticMenu_{$widget_info->seq}();', stalker_stmnRefreshTimer_{$widget_info->seq});
		}


		// 메뉴를 초기화한다.
		function stalkerInitializeStaticMenu_{$widget_info->seq}(){
			stalker_ee_{$widget_info->seq}.style.top = xScrollTop() + stalker_stmnBASE_{$widget_info->seq};
		  	stalkerRefreshStaticMenu_{$widget_info->seq}();
		}

		function pageScroll(){
			//페이지 하단으로 보내버려
			window.scroll(0, document.documentElement.scrollHeight || document.body.scrollHeight);
		}
-->
</script>
<script type='text/javascript'>
	stalkerInitializeStaticMenu_{$widget_info->seq}(); // 스크롤메뉴를 초기화하는 자바스크립트
</script>
